package Revise;

import java.util.Scanner;

public class Fib {
    public static void main(String[] args) {
        System.out.println("请输入要查询的项：");
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int res=fib(n);
        System.out.println(res);
    }
    public static int fib(int n){
        int[] arr=new int[n];
        arr[0]=1;
        arr[1]=1;
        for(int i=2;i<n;i++){
            arr[i]=arr[i-1]+arr[i-2];
        }
        return arr[n-1];
    }
}
